<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	   xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">

	<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
		<property name="defaultHandler"><ref bean="starController"/></property>
		<property name="rootHandler"><ref bean="mainController"/></property>
		<property name="urlMap">
			<map>
				<entry key="/welcome*"><ref bean="otherController"/></entry>
				<entry key="/welcome.html"><ref bean="mainController"/></entry>
				<entry key="/show.html"><ref bean="mainController"/></entry>
				<entry key="/bookseats.html"><ref bean="mainController"/></entry>
				<entry key="/reservation.html"><ref bean="mainController"/></entry>
				<entry key="/payment.html"><ref bean="mainController"/></entry>
				<entry key="/confirmation.html"><ref bean="mainController"/></entry>
			</map>
		</property>
	</bean>

	<bean id="urlMappingWithProps" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
		<property name="defaultHandler"><ref bean="starController"/></property>
		<property name="rootHandler"><ref bean="mainController"/></property>
		<property name="mappings"><ref bean="mappings"/></property>
	</bean>

	<bean id="urlMappingWithPathPatterns" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
		<property name="defaultHandler"><ref bean="starController"/></property>
		<property name="rootHandler"><ref bean="mainController"/></property>
		<property name="patternParser" >
			<bean class="org.springframework.web.util.pattern.PathPatternParser"/>
		</property>
		<property name="mappings"><ref bean="mappings"/></property>
	</bean>

	<bean id="mappings" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
		<property name="location"><value>/org/springframework/web/servlet/handler/map2.properties</value></property>
	</bean>

	<bean id="mainController" class="java.lang.Object"/>

	<bean id="otherController" class="java.lang.Object"/>

	<bean id="starController"	class="java.lang.Object"/>

</beans>	
